﻿using System.Web;
using CooliteExamples.Web.Code;
using CooliteExamples.Web.Controllers;

namespace CooliteExamples.Web.Handlers.Author
{
		/// <summary>
		/// Summary description for $codebehindclassname$
		/// </summary>
		public class GetAvailableAuthorsForBook : HandlerBase
		{
				public override void ProcessRequest(HttpContext context)
				{
						var currentController = (BookEntryController)context.Session[Core.Constants.CURRENT_CONTROLLER];
						int bookId = currentController.CurrentBook.BookId;

						var asr = new AjaxStoreResult(currentController.GetAvailableAuthorsForBook(bookId));
						asr.ExecuteResult(context);
				}
		}
}
